<?php

namespace Test\Unit;

use Design\Structural\Facade\Bios;
use Design\Structural\Facade\Facade;
use Design\Structural\Facade\OperatingSystem;

class FacadeTest extends \Test\BaseTest
{


    public function testComputerOn()
    {
        $os = $this->createMock(OperatingSystem::class);
        $os->method('getName')
            ->will($this->returnValue('Linux'));
        $this->assertInstanceOf(OperatingSystem::class, $os);

        $bios = $this->createMock(Bios::class);
        $bios->method('lanch')
            ->with($os);

        $facade = new Facade($os, $bios);
        $facade->turnOn();
        $facade->turnOff();

        $this->assertSame('Linux', $os->getName());

    }//end testComputerOn()


}//end class
